find the smallest missing number in array